package com.petadoption.serverclient.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.petadoption.serverclient.entity.Productswipe;
import com.petadoption.serverclient.mapper.ProductSwipeMapper;
import com.petadoption.serverclient.service.IProductSwipeService;
import com.petadoption.serverclient.vo.ProductSwipeVO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ProductSwipeServiceImpl extends ServiceImpl<ProductSwipeMapper, Productswipe> implements IProductSwipeService {

    @Resource
    private ProductSwipeMapper productSwipeMapper;

    @Override
    public List<ProductSwipeVO> findProductSwipeById(Integer productId) {
        QueryWrapper queryWrapper = new QueryWrapper<>().eq("product_id", productId);
        return productSwipeMapper.selectList(queryWrapper);
    }
}
